﻿using AppService.IService.Basic_information;
using Domain.Entity.Basic_information;
using Domain.IRepository.Basic_information;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;

namespace AppService.Service.Basic_information
{
    [Dependency(ServiceLifetime.Scoped)]
    public class Address_mentService : IAddress_mentService
    {
        private readonly IAddress_mentRepository am_Repository;

        public Address_mentService(IAddress_mentRepository AmRepository)
        {
             this.am_Repository = AmRepository;
        }

        public List<Address_ment> GetAddress_ments(int currentPage, int PageSize)
        {
            return am_Repository.GetAddress_ments(currentPage, PageSize);
        }

        public bool DelAddress(int id)
        {
            return am_Repository.DelAddress(id);
        }

        public bool AddAddress(Address_ment address)
        {
            return am_Repository.AddAddress(address)>0;
        }

        public Address_ment GetAddress(int id)
        {
            return am_Repository.GetAddress(id);
        }

        public bool UpdAddress(Address_ment address)
        {
            return am_Repository.UpdAddress(address)>0;
        }

        public List<Address_ment> GetAr_type(int currentPage, int PageSize)
        {
            return am_Repository.GetAr_type(currentPage, PageSize);
        }
        public List<Address_ment> GetAd_type(int currentPage, int PageSize)
        {
            return am_Repository.GetAd_type(currentPage, PageSize);
        }
        public List<Address_ment> Address_condition(int currentPage, int PageSize, string? Create_time, string? value2)
        {
            return am_Repository.Address_condition(currentPage, PageSize, Create_time, value2);
        }

        public int Count(string? Create_time, string ?value2)
        {
            return am_Repository.Count(Create_time,value2);
        }
    }
}
